import { CHANGE_FILE, GET_FILE } from '../actions/currentfile';
import { counterStateType } from './types';



export default (state: counterStateType['currentfile'] = {}, action: { type: string, data?: counterStateType['currentfile'] }) => {
  switch (action.type) {
    case GET_FILE:
      return state
    case CHANGE_FILE:
      return Object.assign({}, state, action.data)
    default:
      return state;
  }
}